package com.club.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Builder;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @author zhangfc
 * @date 2022/12/30 10:32
 */
@Data
@TableName(value = "t_act_pic")
@Builder(toBuilder = true)
public class TActPic implements Serializable {

    private static final Long serialVersionUUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "act_pic_id",type = IdType.AUTO)
    private int actPicId;

    /**
     * 活动主键
     */
    @TableField(value = "act_id")
    private int actId;

    /**
     * 图片路径
     */
    @TableField(value = "filepath")
    private String filePath;

    /**
     * 是否封面
     */
    @TableField(value = "iscover")
    private String isCover;

    /**
     * 创建日期
     */
    @JsonSerialize(using = CustomDateTimeSerializer.class)
    @TableField(value = "createtime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 修改日期
     */
    @JsonSerialize(using = CustomDateTimeSerializer.class)
    @TableField(value = "modifytime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date modifyTime;
}
